package ugrouprouter

import (
	"vpn-management-server/src/controller/ugroupcontroller"
	"vpn-management-server/src/interceptor/ugroupinterceptor"
	"vpn-management-server/src/router/routermodel"
)

var ugroupRouter = routermodel.NewRouter()

func init() {
	ugroupRouter.RegisterHandleSet("getUGroupUsersByPage", ugroupinterceptor.PageWithIDValidator, ugroupcontroller.GetUGroupUsersByPage, nil)
	ugroupRouter.RegisterHandleSet("getUGroupUserNameInfos", ugroupinterceptor.UGroupNameInfoValidator, ugroupcontroller.GetUGroupUserNameInfos, nil)
	ugroupRouter.RegisterHandleSet("addUserGroup", ugroupinterceptor.UGroupValidator, ugroupcontroller.AddUserGroup, nil)
	ugroupRouter.RegisterHandleSet("deleteUserGroup", ugroupinterceptor.UGroupNameInfoValidator, ugroupcontroller.DeleteUserGroup, nil)
	ugroupRouter.RegisterHandleSet("getUserGroupsByPage", ugroupinterceptor.PageValidator, ugroupcontroller.GetUserGroupsByPage, nil)
	ugroupRouter.RegisterHandleSet("getAllUserGroupNameInfos", ugroupinterceptor.AdminRankValidator, ugroupcontroller.GetAllUserGroupNameInfos, nil)
	ugroupRouter.RegisterHandleSet("getUserGroupByName", ugroupinterceptor.GetUserGroupByNameValidator, ugroupcontroller.GetUserGroupByName, nil)
	ugroupRouter.RegisterHandleSet("getUGroupByCurrAdmin", nil, ugroupcontroller.GetUGroupByCurrAdmin, nil)
	ugroupRouter.RegisterHandleSet("getUGroupNameInfosWithoutAdmin", nil, ugroupcontroller.GetUGroupNameInfosWithoutAdmin, nil)
}
